<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib prefix="stella" uri="http://stella.caelum.com.br/faces"%>
<%@ taglib prefix="a4j" uri="http://richfaces.org/a4j"%>

<html>
	<head>
		<title>Login de Usuarios</title>
		<link rel="StyleSheet" type="text/css" href="../../style/estilos.css" media="screen" />
	</head>
	<body>
		<f:view>
			<div id="Layer1"><img src="images/logo.jpg" width="100px" height="60" /></div>
			
  			<div id="Layer1">
				<h:panelGrid style="width:250px" columns="3" border="0">
					<rich:panel header="Login" style="background-color: #ebf3fd;">
						<h:form id="LoginForm">							
								<h:panelGrid id="lpg" columns="3" >
									
								<h:outputText value="Login:"/> 
								<h:inputText id="login" required="true" value="#{loginController.login}" styleClass="inputbox"/>
								<h:message for="login"/>								
									
								<h:outputText value="Senha:"/> 
								<h:inputSecret id="senha" required="true" value="#{loginController.senha}" styleClass="inputbox" />
								<h:message for="senha"/>
	
								<a4j:commandButton value="Login" action="#{loginController.logar}" oncomplete="#{loginController.notUser}"/>
									
							</h:panelGrid>
							
							<rich:modalPanel id="modalLogin" autosized="true" width="300" height="100">  
				                   <f:facet name="header">  
				                      <h:panelGroup>  
				                         <h:outputText value="Mensagem Login"></h:outputText>  
				                      </h:panelGroup>  
				                   </f:facet>  
				                              
				                   <f:facet name="controls">  
				                      <h:panelGroup>  
				                         <h:graphicImage value="/gfx/remove.png" style="border: none;" id="hidelink" />  
				                         <rich:componentControl for="modalLogin" attachTo="hidelink" operation="hide" event="onclick" />  
				                      </h:panelGroup>  
				                   </f:facet>                                                 
				                <h:outputText value="Login ou senha incorreto!" />  
				            </rich:modalPanel>
						</h:form>
					</rich:panel>
				</h:panelGrid>
			</div>
		</f:view> 
	</body>
</html>